package pub.wkq.lambda.functionalinterfaces;

import java.time.Instant;
import java.time.LocalDate;
import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Predicate;

public class Main {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>() {{
            add("wkq");
            add("zbb");
            add(null);
        }};
        System.out.println("list = " + list);
        boolean b = list.removeIf(s -> s == null);
        System.out.println("list = " + list);
        LocalDate day = LocalDate.of(1997, 01, 27);
        LocalDate hireDate = Objects.requireNonNullElse(day, LocalDate.of(1970, 1, 1));
        LocalDate hireDate1 = Objects.requireNonNullElseGet(day, () -> LocalDate.of(1970, 1, 1));
    }
}
